//
//  ListViewController.m
//  Cat
//
//  Created by lushitong on 2019/1/3.
//  Copyright © 2019年 lushitong. All rights reserved.
//

#import "ListViewController.h"
#import "QKCollectionViewFlowLayout.h"

@implementation ListViewController

- (void)viewDidLoad {
    [super viewDidLoad];
	self.topTitleView.hidden = YES;
	[self.view addSubview:self.listView];
}

- (void)sendRequestWithID:(NSNumber *)number {
	// 请求网络数据
	[self.listView sendRequestByID:number];
}

#pragma mark----- lazy init -----

- (ListCollectionView *)listView {
	if (!_listView) {
		QKCollectionViewFlowLayout *flowlayout = [[QKCollectionViewFlowLayout alloc] init];
		flowlayout.naviHeight = 0.0;
		//设置滚动方向
		[flowlayout setScrollDirection:UICollectionViewScrollDirectionVertical];
		//左右间距
		flowlayout.minimumInteritemSpacing = kQKFitModuleFloor(10);
		//上下间距
		flowlayout.minimumLineSpacing = 0.0;
		flowlayout.sectionInset = UIEdgeInsetsMake(0, 2, 0, 2);
		_listView = [[ListCollectionView alloc] initWithFrame:CGRectMake(0.0, 0.0, ScreenWidth, ScreenHeight - self.topTitleView.height - kQKFitModuleDecimal(20.0)) layout:flowlayout];
	}
	return _listView;
		
}

@end
